(0) Obligation:

Runtime Complexity TRS:
The TRS R consists of the following rules:

plus#2(0, x12) → x12
plus#2(S(x4), x2) → S(plus#2(x4, x2))
fold#3(Nil) → 0
fold#3(Cons(x4, x2)) → plus#2(x4, fold#3(x2))
main(x1) → fold#3(x1)

Rewrite Strategy: INNERMOST

(1) RenamingProof (EQUIVALENT transformation)

Renamed function symbols to avoid clashes with predefined symbol.

(2) Obligation:

Runtime Complexity Relative TRS:
The TRS R consists of the following rules:

plus#2(0', x12) → x12
plus#2(S(x4), x2) → S(plus#2(x4, x2))
fold#3(Nil) → 0'
fold#3(Cons(x4, x2)) → plus#2(x4, fold#3(x2))
main(x1) → fold#3(x1)

S is empty.
Rewrite Strategy: INNERMOST

(3) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)

Infered types.

(4) Obligation:

Innermost TRS:
Rules:
plus#2(0', x12) → x12
plus#2(S(x4), x2) → S(plus#2(x4, x2))
fold#3(Nil) → 0'
fold#3(Cons(x4, x2)) → plus#2(x4, fold#3(x2))
main(x1) → fold#3(x1)

Types:
plus#2 :: 0':S → 0':S → 0':S
0' :: 0':S
S :: 0':S → 0':S
fold#3 :: Nil:Cons → 0':S
Nil :: Nil:Cons
Cons :: 0':S → Nil:Cons → Nil:Cons
main :: Nil:Cons → 0':S
hole_0':S1_0 :: 0':S
hole_Nil:Cons2_0 :: Nil:Cons
gen_0':S3_0 :: Nat → 0':S
gen_Nil:Cons4_0 :: Nat → Nil:Cons

(5) OrderProof (LOWER BOUND(ID) transformation)

Heuristically decided to analyse the following defined symbols:
plus#2, fold#3

They will be analysed ascendingly in the following order:
plus#2 < fold#3

(6) Obligation:

Innermost TRS:
Rules:
plus#2(0', x12) → x12
plus#2(S(x4), x2) → S(plus#2(x4, x2))
fold#3(Nil) → 0'
fold#3(Cons(x4, x2)) → plus#2(x4, fold#3(x2))
main(x1) → fold#3(x1)

Types:
plus#2 :: 0':S → 0':S → 0':S
0' :: 0':S
S :: 0':S → 0':S
fold#3 :: Nil:Cons → 0':S
Nil :: Nil:Cons
Cons :: 0':S → Nil:Cons → Nil:Cons
main :: Nil:Cons → 0':S
hole_0':S1_0 :: 0':S
hole_Nil:Cons2_0 :: Nil:Cons
gen_0':S3_0 :: Nat → 0':S
gen_Nil:Cons4_0 :: Nat → Nil:Cons

Generator Equations:
gen_0':S3_0(0) ⇔ 0'
gen_0':S3_0(+(x, 1)) ⇔ S(gen_0':S3_0(x))
gen_Nil:Cons4_0(0) ⇔ Nil
gen_Nil:Cons4_0(+(x, 1)) ⇔ Cons(0', gen_Nil:Cons4_0(x))

The following defined symbols remain to be analysed:
plus#2, fold#3

They will be analysed ascendingly in the following order:
plus#2 < fold#3

(7) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
plus#2(gen_0':S3_0(n6_0), gen_0':S3_0(b)) → gen_0':S3_0(+(n6_0, b)), rt ∈ Ω(1 + n60)

Induction Base:
plus#2(gen_0':S3_0(0), gen_0':S3_0(b)) →RΩ(1)
gen_0':S3_0(b)

Induction Step:
plus#2(gen_0':S3_0(+(n6_0, 1)), gen_0':S3_0(b)) →RΩ(1)
S(plus#2(gen_0':S3_0(n6_0), gen_0':S3_0(b))) →IH
S(gen_0':S3_0(+(b, c7_0)))

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(8) Complex Obligation (BEST)

(9) Obligation:

Innermost TRS:
Rules:
plus#2(0', x12) → x12
plus#2(S(x4), x2) → S(plus#2(x4, x2))
fold#3(Nil) → 0'
fold#3(Cons(x4, x2)) → plus#2(x4, fold#3(x2))
main(x1) → fold#3(x1)

Types:
plus#2 :: 0':S → 0':S → 0':S
0' :: 0':S
S :: 0':S → 0':S
fold#3 :: Nil:Cons → 0':S
Nil :: Nil:Cons
Cons :: 0':S → Nil:Cons → Nil:Cons
main :: Nil:Cons → 0':S
hole_0':S1_0 :: 0':S
hole_Nil:Cons2_0 :: Nil:Cons
gen_0':S3_0 :: Nat → 0':S
gen_Nil:Cons4_0 :: Nat → Nil:Cons

Lemmas:
plus#2(gen_0':S3_0(n6_0), gen_0':S3_0(b)) → gen_0':S3_0(+(n6_0, b)), rt ∈ Ω(1 + n60)

Generator Equations:
gen_0':S3_0(0) ⇔ 0'
gen_0':S3_0(+(x, 1)) ⇔ S(gen_0':S3_0(x))
gen_Nil:Cons4_0(0) ⇔ Nil
gen_Nil:Cons4_0(+(x, 1)) ⇔ Cons(0', gen_Nil:Cons4_0(x))

The following defined symbols remain to be analysed:
fold#3

(10) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
fold#3(gen_Nil:Cons4_0(n575_0)) → gen_0':S3_0(0), rt ∈ Ω(1 + n5750)

Induction Base:
fold#3(gen_Nil:Cons4_0(0)) →RΩ(1)
0'

Induction Step:
fold#3(gen_Nil:Cons4_0(+(n575_0, 1))) →RΩ(1)
plus#2(0', fold#3(gen_Nil:Cons4_0(n575_0))) →IH
plus#2(0', gen_0':S3_0(0)) →LΩ(1)
gen_0':S3_0(+(0, 0))

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(11) Complex Obligation (BEST)

(12) Obligation:

Innermost TRS:
Rules:
plus#2(0', x12) → x12
plus#2(S(x4), x2) → S(plus#2(x4, x2))
fold#3(Nil) → 0'
fold#3(Cons(x4, x2)) → plus#2(x4, fold#3(x2))
main(x1) → fold#3(x1)

Types:
plus#2 :: 0':S → 0':S → 0':S
0' :: 0':S
S :: 0':S → 0':S
fold#3 :: Nil:Cons → 0':S
Nil :: Nil:Cons
Cons :: 0':S → Nil:Cons → Nil:Cons
main :: Nil:Cons → 0':S
hole_0':S1_0 :: 0':S
hole_Nil:Cons2_0 :: Nil:Cons
gen_0':S3_0 :: Nat → 0':S
gen_Nil:Cons4_0 :: Nat → Nil:Cons

Lemmas:
plus#2(gen_0':S3_0(n6_0), gen_0':S3_0(b)) → gen_0':S3_0(+(n6_0, b)), rt ∈ Ω(1 + n60)
fold#3(gen_Nil:Cons4_0(n575_0)) → gen_0':S3_0(0), rt ∈ Ω(1 + n5750)

Generator Equations:
gen_0':S3_0(0) ⇔ 0'
gen_0':S3_0(+(x, 1)) ⇔ S(gen_0':S3_0(x))
gen_Nil:Cons4_0(0) ⇔ Nil
gen_Nil:Cons4_0(+(x, 1)) ⇔ Cons(0', gen_Nil:Cons4_0(x))

No more defined symbols left to analyse.

(13) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
plus#2(gen_0':S3_0(n6_0), gen_0':S3_0(b)) → gen_0':S3_0(+(n6_0, b)), rt ∈ Ω(1 + n60)

(14) BOUNDS(n^1, INF)

(15) Obligation:

Innermost TRS:
Rules:
plus#2(0', x12) → x12
plus#2(S(x4), x2) → S(plus#2(x4, x2))
fold#3(Nil) → 0'
fold#3(Cons(x4, x2)) → plus#2(x4, fold#3(x2))
main(x1) → fold#3(x1)

Types:
plus#2 :: 0':S → 0':S → 0':S
0' :: 0':S
S :: 0':S → 0':S
fold#3 :: Nil:Cons → 0':S
Nil :: Nil:Cons
Cons :: 0':S → Nil:Cons → Nil:Cons
main :: Nil:Cons → 0':S
hole_0':S1_0 :: 0':S
hole_Nil:Cons2_0 :: Nil:Cons
gen_0':S3_0 :: Nat → 0':S
gen_Nil:Cons4_0 :: Nat → Nil:Cons

Lemmas:
plus#2(gen_0':S3_0(n6_0), gen_0':S3_0(b)) → gen_0':S3_0(+(n6_0, b)), rt ∈ Ω(1 + n60)
fold#3(gen_Nil:Cons4_0(n575_0)) → gen_0':S3_0(0), rt ∈ Ω(1 + n5750)

Generator Equations:
gen_0':S3_0(0) ⇔ 0'
gen_0':S3_0(+(x, 1)) ⇔ S(gen_0':S3_0(x))
gen_Nil:Cons4_0(0) ⇔ Nil
gen_Nil:Cons4_0(+(x, 1)) ⇔ Cons(0', gen_Nil:Cons4_0(x))

No more defined symbols left to analyse.

(16) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
plus#2(gen_0':S3_0(n6_0), gen_0':S3_0(b)) → gen_0':S3_0(+(n6_0, b)), rt ∈ Ω(1 + n60)

(17) BOUNDS(n^1, INF)

(18) Obligation:

Innermost TRS:
Rules:
plus#2(0', x12) → x12
plus#2(S(x4), x2) → S(plus#2(x4, x2))
fold#3(Nil) → 0'
fold#3(Cons(x4, x2)) → plus#2(x4, fold#3(x2))
main(x1) → fold#3(x1)

Types:
plus#2 :: 0':S → 0':S → 0':S
0' :: 0':S
S :: 0':S → 0':S
fold#3 :: Nil:Cons → 0':S
Nil :: Nil:Cons
Cons :: 0':S → Nil:Cons → Nil:Cons
main :: Nil:Cons → 0':S
hole_0':S1_0 :: 0':S
hole_Nil:Cons2_0 :: Nil:Cons
gen_0':S3_0 :: Nat → 0':S
gen_Nil:Cons4_0 :: Nat → Nil:Cons

Lemmas:
plus#2(gen_0':S3_0(n6_0), gen_0':S3_0(b)) → gen_0':S3_0(+(n6_0, b)), rt ∈ Ω(1 + n60)

Generator Equations:
gen_0':S3_0(0) ⇔ 0'
gen_0':S3_0(+(x, 1)) ⇔ S(gen_0':S3_0(x))
gen_Nil:Cons4_0(0) ⇔ Nil
gen_Nil:Cons4_0(+(x, 1)) ⇔ Cons(0', gen_Nil:Cons4_0(x))

No more defined symbols left to analyse.

(19) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
plus#2(gen_0':S3_0(n6_0), gen_0':S3_0(b)) → gen_0':S3_0(+(n6_0, b)), rt ∈ Ω(1 + n60)

(20) BOUNDS(n^1, INF)